<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/11 0011
 * Time: 下午 4:40
 */
header("Content-Type: text/html;charset=utf-8");
header("Access-Control-Allow-Origin:*");

//1.创建链接
$hostName="127.0.0.1";
$dbRoot="root";
$dbPwd="";
$dbPort="3306";
$dbName="sasa";
$conn=new mysqli($hostName,$dbRoot,$dbPwd,$dbName,$dbPort);
//2.设置编码
mysqli_query($conn,"set names utf8");

